﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using iLangl.Customer.DNN.Entities;
using DotNetNuke.Services.Localization;

namespace iLangl.Customer.DNN
{
	public class dtoContentHelper
	{
		public static dtoContent.LanguagePairsRow FindLanguagePair(dtoContent content, Locale source, Locale target)
		{
			foreach (dtoContent.LanguagePairsRow lpr in content.LanguagePairs)
			{
				if((lpr.SourceLanguage == source.Code) &&(lpr.TargetLanguage == target.Code))
				{
					return lpr;
				}
			}

					return null;
		}
	}
}